package com.xbongbong.pro.statistics.service;

import com.xbongbong.config.DataSource;
import com.xbongbong.config.DataSourceNames;
import com.xbongbong.paas.domain.entity.ext.CkPaasFormDataEntityExt;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.saas.domain.entity.WorkOrderFlowUserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 单表
 */
public interface CkPaasFormDataService {
    List<CkPaasFormDataEntityExt> findEntitys(Map<String, Object> entity);

    List<CkPaasFormDataEntityExt> findEntitysBySql(String sql);

    Integer countBySql(String sql);

    Integer countBySqlMySql(String sql);

    @DataSource(DataSourceNames.CK_DATA)
    void insertBatch(List workOrderFlowUserEntityList, Integer businessType) throws XbbException;

    @DataSource(DataSourceNames.CK_DATA)
    void insertBatch(List list, List<String> columns, String tableName) throws XbbException;

    @DataSource(DataSourceNames.CK_DATA)
    void insertBatchCommonCK(@Param("list")List<Map<String,Object>>  list, @Param("tableName") String tableName, @Param("column") List<String> column );

    @DataSource(DataSourceNames.CK_DATA)
    List<String> getColumnNameByTableName(@Param("tableName") String tableName);
}
